<h3>Listing borrow records</h3>

<table>
  <tr>
    <th>Book</th>
    <th>User</th>
    <th>Start_Date</th>
    <th>Due_Date</th>
    <th>Status</th>
    <th>Associated Messages</th>
  </tr>

<% @borrow_recs.each do |borrow_rec| %>
  <tr>
    <td><%=h Book.find(borrow_rec.book_id).title %></td>
    <td><%=h User.find(borrow_rec.user_id).name %></td>
    <td><%=h borrow_rec.start_date %></td>
    <td><%=h borrow_rec.due_date %></td>
    <td><%=h borrow_rec.status %></td>
    <td><%= link_to 'Click Here', :controller => 'messages', :action => 'get_by_brid', :id => borrow_rec.id %></td>
  </tr>
<% end %>
</table>

<br />
